<?php
/**
 *UserCapitalLogController
 * @author tan bing
 * @date 2021-08-13 14:56
 */


namespace Modules\User\Http\Controllers\Admin;


use Modules\User\Services\Admin\UserServices;

class UserCapitalLogController extends AdminBaseController
{

    /**
     * @var UserServices
     * @author tan bing
     */
    private $userServices;

    /**
     * UserCapitalLogController constructor.
     *
     * @param UserServices $userServices
     * @author tan bing
     * @date 2021-08-13 15:09
     */
    public function __construct(UserServices $userServices)
    {
        $this->userServices = $userServices;
        parent::__construct();
    }

    /**
     * 用户资金流水记录页面.
     *
     * @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View
     * @author tan bing
     * @date 2021-08-13 15:06
     */
    public function index()
    {
        $param = $this->userServices->getRequestParam();
        return view('user::admin.user_capital_log.index', compact('param'));
    }

    /**
     * 获取用户资金流水记录.
     *
     * @return array
     * @author tan bing
     * @date 2021-08-13 15:07
     */
    public function getPageData()
    {
        $result = $this->userServices->getUserCapitalLogPageData();
        return $this->success($result);
    }
}